/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package milkyway.hightech.testit;

import java.io.IOException;
import milkyway.hightech.b2b.B2B;
import milkyway.hightech.b2b.BankRegistry;
import milkyway.hightech.banking.BankImpl;
import milkyway.hightech.timer.TimeEmitter;

/**
 *
 * @author michael
 */
public class TestIt
{
    public static void main(String[] args) throws IOException
    {
	BankImpl bank1 = new BankImpl("Sparkasse");
	BankImpl bank2 = new BankImpl("Spardabank");
	
	BankRegistry.getInstance().bind(bank1.getBankName(), (B2B)bank1);
	BankRegistry.getInstance().bind(bank2.getBankName(), (B2B)bank2);
	
	TestItImpl test = new TestItImpl(bank1, bank2);
	
	TimeEmitter.getInstance().addObserver(test);
	TimeEmitter.getInstance().setTimeSpeed(TimeEmitter.ONE_DAY);
	TimeEmitter.getInstance().startTiming();
    }
}
